#pragma once
//#include "Mono.h"
#include "MonoVar.h"

// MonoUserListBox

class MonoUserListBox : public CListBox
{
	DECLARE_DYNAMIC(MonoUserListBox)

public:
	MonoUserListBox();
	virtual ~MonoUserListBox();
	int		AddString(LPCTSTR lpszItem);
	int		InsertString(int nIndex, LPCTSTR lpszItem);
	int		DeleteString(UINT nIndex);
	void	ResetContent();
	int		GetNowPosition(){return m_nNowPosition;}
	int		SetCurSel(int nSelect);
	int		GetCurSel() const {return CListBox::GetCurSel();}
	void	SetParent(CDialog* pParent);
	void	InitListBox();
	void	InitIdList();
	void	InitStringList();	
	bool	GetParentCache(SinglePageDataMap& pageDataCache);
	void	UpdateParentData();
	int		GetLastPageId();
	int		GetNewPageId(){return GetLastPageId() + 1;}

protected:
	DECLARE_MESSAGE_MAP()
protected:
	int		m_nMaxWidth;
	int		m_nNowPosition;	//For the CListBox
	CDialog	*m_pParent;
private:
	CList<int>	m_PageIdList;	//For the SinglePageDataMap
public:
	afx_msg void OnLbnSelchange();
};


